package com.wzw.ad;

import java.util.ArrayList;
import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class Adposition {

	// 广告位id
	private String ADId;
	// 媒体id
	private String mediaId;
	// 广告位名
	private String ADName;
	// 媒体名
	private String mediaName;
	// 广告位URL
	private String adUrl;
	// 点击数
	private String hitCount;
	// 参与数
	private String registerCount;
	
	public String toJSONString() {
		return JSONObject.fromObject(this).toString();
	}
	
	public String getADId() {
		return ADId;
	}
	
	public void setADId(String aDId) {
		ADId = aDId;
	}
	
	public String getMediaId() {
		return mediaId;
	}
	
	public void setMediaId(String mediaId) {
		this.mediaId = mediaId;
	}
	
	public String getADName() {
		return ADName;
	}
	
	public void setADName(String aDName) {
		ADName = aDName;
	}
	
	public String getMediaName() {
		return mediaName;
	}
	
	public void setMediaName(String mediaName) {
		this.mediaName = mediaName;
	}
	
	public String getAdUrl() {
		return adUrl;
	}

	public void setAdUrl(String adUrl) {
		this.adUrl = adUrl;
	}

	public String getHitCount() {
		return hitCount;
	}
	
	public void setHitCount(String hitCount) {
		this.hitCount = hitCount;
	}
	
	public String getRegisterCount() {
		return registerCount;
	}
	
	public void setRegisterCount(String registerCount) {
		this.registerCount = registerCount;
	}
	
	public static void main(String arg[]) {
		List<Adposition> list = new ArrayList<Adposition>();
		for(int i=0; i<4; i++) {
			Adposition ad = new Adposition();
			ad.setMediaId(String.valueOf(i));
			ad.setMediaName("media"+i);
			list.add(ad);
		}
		JSONArray json = JSONArray.fromObject(list);
		System.out.println(json);
	}
	
}
